<template>
  <div>
    <div v-for="mes in messageList" :key="mes.id" class="o">
      <el-row>
        <el-col :span="15">
          <div style="margin-left: 30px; padding-top: 30px">
            <span>系统上新：</span>
            <span style="margin-left: 15px; color: palevioletred">{{ mes.context }}</span>
          </div>
        </el-col>
        <el-col :span="5">
          <div style="margin-left: 10px; padding-top: 35px; font-size: 14px; color: #555">{{ mes.createTime }}</div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: "message",
  data() {
    return {
      messageList: []
    }
  },
  created() {
    this.getMessage();
  },
  methods: {
    getMessage(){
      this.$axios.get("/system-notice/system").then(res=>{
        if (res.data.code === '200'){
          this.messageList = res.data.data;
        }else {
          this.$message.error(res.data.message);
        }
      })
    }
  }
}
</script>

<style scoped>
.o{
  background-color: whitesmoke;
  height: 90px;
  width: 80%;
  border-radius: 9px;
  margin-top: 15px;
}
</style>
